<?php get_header(); ?>

<div id="wrap">
<div id="header">
<h2 class="introtext">
There is nothing that cannot be achieved by firm <span class="highlight2">imagination.</span>

</h2>
</div>
<div id="contents">
<div class="clear"></div>
<div id="aboutdiv">
<h2>Asides</h2>
<?php

global $aside_setting_cat;
	if(get_settings('aside_post_cat_id')!='')
	{ 
		$aside_setting_cat = get_settings('aside_post_cat_id');
	}
	else
	{
		$aside_setting_cat = '100'; }

global $aside_setting_num;
	if(get_settings('aside_post_number')!='')
	{ 
		$aside_setting_num = get_settings('aside_post_number');
	}
	else
	{
		$aside_setting_num = '3'; }

global $recent_setting_num;
	if(get_settings('recent_post_number')!='')
	{ 
		$recent_setting_num = get_settings('recent_post_number');
	}
	else
	{
		$recent_setting_num = '5'; }

global $home_setting_num;
	if(get_settings('home_page_post_number')!='')
	{ 
		$home_setting_num = get_settings('home_page_post_number');
	}
	else
	{
		$home_setting_num = '2'; }

query_posts('cat='.$aside_setting_cat.'&showposts='.$aside_setting_num.'&offset=0');
while (have_posts()) : the_post();

?>
<p><span class="openquote"></span><?php echo $wpdb->get_var("SELECT post_content FROM $wpdb->posts WHERE ID = $id");?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">#</a> <img src="<?php bloginfo('stylesheet_directory'); ?>/images/quote2.gif" alt="Closing Quote" /></p>
<?php endwhile; ?>
</div>
<div id="highlights">
  <h2>What's New?</h2>
<ul>
<?php
query_posts('cat=-'.$aside_setting_cat.'&showposts='.$recent_setting_num.'&offset='.$home_setting_num);
while (have_posts()) : the_post();
?>
<li><h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
<?php the_time('F jS, Y') ?> by <?php the_author() ?>
</li>
<?php endwhile; ?>
</ul>

</div>
<div id="homecontents"> 
<?php
query_posts('cat=-'.$aside_setting_cat.'&showposts='.$home_setting_num.'&offset=0');
while (have_posts()) : the_post();
?>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<span class="postinfo"><?php the_time('F jS, Y') ?> by <?php the_author() ?></span>
<?php the_content('Read the full post »'); ?>
<p class="postmetadata">Filed under: <?php the_category(', ') ?> | <?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?></p>
<?php endwhile; ?>
</div>

<div class="clear"></div>

</div>

</div>
<?php get_footer(); ?>